home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Games #12
/
GEGA012.iso
/
eroticos
/
nude-streakers.swf
/
scripts
/
frame_13
/
PlaceObject2_906_111
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2005-09-23
|
3KB
|
120 lines
onClipEvent(enterFrame){
this.swapDepths(this._y);
_root.x = Math.cos(angle * 0.0174) * _root.speed;
_root.y = Math.sin(angle * 0.0174) * _root.speed;
if(state == "fall")
{
body.gotoAndStop("fall");
_root.speed -= 1 * (_root.speed > 0);
if(_root.speed < 2)
{
_root.script.caught();
_root.speed = 0;
}
}
if(state == "on")
{
left = Key.isDown(37);
right = Key.isDown(39);
up = Key.isDown(38);
down = Key.isDown(40);
boost = Key.isDown(32);
my_colour.setTransform({rb:bc});
if(Key.isDown(32))
{
_root.rd = true;
}
else
{
_root.rd = false;
}
if(Key.isDown(32) && _root.recharge > 1)
{
_root.crowd.gotoAndPlay(2);
bc += 10 * (bc < 150 && _root.speed > 0);
max_speed = 22 - speed_adj;
}
else
{
max_speed = 16 - speed_adj;
bc -= 10 * (bc > 0);
if(_root.speed > max_speed)
{
ls -= 2;
rs -= 2;
us -= 2;
ds -= 2;
}
}
if(Key.isDown(37))
{
if(rs + us + ds == 0 && ls < max_speed)
{
ls += 2;
}
temp_angle = -162;
}
else if(ls > 0)
{
ls -= 4;
}
if(Key.isDown(39))
{
if(ls + us + ds == 0 && rs < max_speed)
{
rs += 2;
}
temp_angle = 18;
}
else if(rs > 0)
{
rs -= 4;
}
if(Key.isDown(38))
{
if(ls + rs + ds == 0 && us < max_speed)
{
us += 2;
}
temp_angle = -18;
}
else if(us > 0)
{
us -= 4;
}
if(Key.isDown(40))
{
if(ls + rs + us == 0 && ds < max_speed)
{
ds += 2;
}
temp_angle = 162;
}
else if(ds > 0)
{
ds -= 4;
}
if(_root.speed <= 2)
{
angle = temp_angle;
dir = down * 1 + right * 2 + up * 3 + left * 4 + (_root.level - 1) * 10;
!(dir == 20 || dir == 10) ? (a = a) : (dir = 0);
this.gotoAndStop(dir);
body.gotoAndStop(1);
}
if(_root.speed > 0)
{
body.play();
}
_root.speed = ls + rs + us + ds;
ls = Math.max(0,ls);
rs = Math.max(0,rs);
us = Math.max(0,us);
ds = Math.max(0,ds);
}
else
{
body.stop();
}
}